<template>
  <basic-container>
    <!-- START goBack -->
    <div class="el-page-header">
      <div class="el-page-header__left haruyuki-flex-center haruyuki-size-18" @click="goBack" >
        <i class="el-icon-arrow-left"></i>
        <div class="haruyuki-size-16">返回</div>
      </div>
      <div class="el-page-header__content haruyuki-flex-center">
        <el-image
          style="width: 20px; height: 20px"
          src="/img/merchant-icon/terminal_mini.png"
          fit="fill"
        ></el-image>
        <span class="haruyuki-ml-6">终端管理
          <span class="terminal-title" v-if="rpsName">(门店: {{ rpsName }})</span>
          <span class="terminal-title" v-if="rpstName">(收银员: {{ rpstName }})</span>
        </span>
        </div>
    </div>
    <!-- END goBack -->
    <!-- 终端 -->
    <module-terminal-bind></module-terminal-bind>
  </basic-container>
</template>

<script>
// import { queryAisleList } from "@/api/rb-merchant/posinfo/pos_info_details";
import moduleTerminalBind from "../component/module_terminal_bind";

export default {
  components: {
    moduleTerminalBind
  },
  data() {
    return {
      rpsName: '', //门店名称
      rpstName: '', //收银员名称
    };
  },
  computed: {
    base64() {
      return (val) => {
        if(val){
          if (val.indexOf('data:image/png;base64,') == -1) {
            return ('data:image/png;base64,' + val );
          } else {
            return val;
          }
        }else{
          return ''
        }

      };
    },
  },
  created() {
    // this.infoData();
    if (this.$route.query.rpsName) {
      this.rpsName = this.$route.query.rpsName
    } else if (this.$route.query.rpstName) {
      this.rpstName = this.$route.query.rpstName
    }
    
  },
  mounted() {},
  methods: {
    /* 页面加载 初始化请求 微信认证通道列表 接口 */
    // infoData() {
    //   // this.id = this.$route.query.id;
    //   // this.rpiNo = this.$route.query.rpiNo;
    // //   const _this = this;
    // //   queryAisleList(this.rpiNo).then((res) => {
    // //     _this.passType = res.data.data;
    // //     _this.aisleName = _this.passType[0].aisleName;
    // //     _this.clickActive(0)
    // //   });
    // },
    /* 返回页面 */
    goBack() {
      this.$router.$avueRouter.closeTag();
      this.$router.back();
    },
  },
};
</script>

<style lang="scss" scoped>
.terminal-title {
  font-size: 14px;
  color: #4663FD;
}
</style>